<ui:component xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:a4j="http://richfaces.org/a4j"
	xmlns:rich="http://richfaces.org/rich"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:richx="http://richfaces.org/richx">

	<rich:modalPanel id="msgPanel" width="350" height="100" zindex="10500" autosized="true">
		<f:facet name="header">
			<h:panelGroup>
				<h:outputText value="SIGIT"></h:outputText>
			</h:panelGroup>
		</f:facet>
		<f:facet name="controls">
			<h:panelGroup>
				<h:graphicImage value="/img/close.png" styleClass="hidelink"
					id="hidelink" />
				<rich:componentControl for="msgPanel" attachTo="hidelink"
					operation="hide" event="onclick" />
			</h:panelGroup>
		</f:facet>

		<ui:remove>
		<div style="text-align: center;">
		</div>
		</ui:remove>
			<ui:remove>
			<div style="text-align: left; margin: 1em auto; width: 100%;">
			</div>
			</ui:remove>
			
        <rich:componentControl for="msgPanel" attachTo="link"
				operation="show" event="onclick" />
		
		<table width="100%">
			<tr>
				<td width="10%" align="center">
					<h:graphicImage value="/img/error.gif" />
				</td>
				<td width="90%">
					<rich:messages showDetail="true"></rich:messages>
				</td>
			</tr>
			<tr>
				<td colspan="2" align="center">
					<input type="button" value="#{messages['button.ok']}" onclick="#{rich:component('msgPanel')}.hide();"/>
					<!-- a4j:commandButton value="#{messages['button.ok']}" onclick="" immediate="true"/-->
				</td>
			</tr>
		</table>
			
	</rich:modalPanel>

	<ui:remove>
	<rich:modalPanel id="verDocPanel" autosized="true">
		<f:facet name="header">
			<h:outputText value="Documento"/>
		</f:facet>
		<f:facet name="controls">
			<h:panelGroup>
				<h:graphicImage value="/img/close.png" styleClass="hidelink"
					id="hideDocPanel" />
				<rich:componentControl for="verDocPanel" attachTo="hideDocPanel"
					operation="hide" event="onclick" />
			</h:panelGroup>
		</f:facet>
		<h:form id="docForm">
			<a4j:mediaOutput id="pdfOut" name="pdfOut" rendered="false"
			 uriAttribute="data"
			 element="object"
			 width="800"
			 height="600"
			 createContent="#{documentViewer.viewFile}"
			 mimeType="application/pdf"
			 standBy="loading..."/>
 		</h:form>
		<script type="text/javascript">
		document.getElementById("docForm:pdfOut").type="application/pdf";
		</script>
 	</rich:modalPanel>
 	</ui:remove>


</ui:component>
